<?php
namespace app\common\lib;

class Num {
    //记录和数字相关的类库
    public static function getCode(int $len = 4) :int{
        $code = rand(1000, 9999);
        if($len == 6){
            $code = rand(100000, 999999);
        }

        return $code;
    }
}